package io;

import java.io.File;
import java.io.IOException;

public class IODemo1 {
    public static void main(String[] args) throws IOException {
        //File f = new File("D:/Fiddler/credits.txt");
        File f = new File("./Fiddler/credits.txt");
        //获取属性
        System.out.println(f.getParent());
        //获取文件名
        System.out.println(f.getName());
        //获取路径
        System.out.println(f.getPath());
        //返回绝对路径
        System.out.println(f.getAbsolutePath());
        //返回修饰过的绝对路径
        System.out.println(f.getCanonicalPath());
    }
}

